package com.nc.cloud.gateway.feign;

import com.nc.cloud.api.vo.authority.PermissionInfo;
import com.nc.cloud.gateway.fallback.UserServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;
/**
 * @Description
 * @ClassName IUserService
 * @Author NC—Cloud
 * @date 2020.04.14 10:10
 */
@FeignClient(value = "nc-admin",fallback = UserServiceFallback.class)
public interface IUserService {

    @RequestMapping(value="/api/user/un/{userName}/permissions",method = RequestMethod.GET)
    public List<PermissionInfo> getPermissionByUserName(@PathVariable("userName") String userName);
    @RequestMapping(value="/api/permissions",method = RequestMethod.GET)
    List<PermissionInfo> getAllPermissionInfo();

}
